PRC_soviet_tribute_clear_all = {
	effect_tooltip = {
		remove_ideas = PRC_soviet_tribute_1
	}
	hidden_effect = {		
		remove_ideas = {
			PRC_soviet_tribute_1
			PRC_soviet_tribute_2
			PRC_soviet_tribute_3
			PRC_soviet_tribute_4
			PRC_soviet_tribute_5
			PRC_soviet_tribute_6
		}
	}
}

#Important to put HIGHEST first
PRC_soviet_tribute_level_up = {
	# level 5 not relevant. Cannot go above.
	if = {
		limit = { has_idea = PRC_soviet_tribute_5 }
		swap_ideas = {
			remove_idea = PRC_soviet_tribute_5
			add_idea = PRC_soviet_tribute_6
		}
		set_variable = { WTT_communist_china_integration_cost = 50 }
	}
	else_if = {
		limit = { has_idea = PRC_soviet_tribute_4 }
		swap_ideas = {
			remove_idea = PRC_soviet_tribute_4
			add_idea = PRC_soviet_tribute_5
		}
		set_variable = { WTT_communist_china_integration_cost = 100 }
	}
	else_if = {
		limit = { has_idea = PRC_soviet_tribute_3 }
		swap_ideas = {
			remove_idea = PRC_soviet_tribute_3
			add_idea = PRC_soviet_tribute_4
		}
		set_variable = { WTT_communist_china_integration_cost = 150 }
	}
	else_if = {
		limit = { has_idea = PRC_soviet_tribute_2 }
		swap_ideas = {
			remove_idea = PRC_soviet_tribute_2
			add_idea = PRC_soviet_tribute_3
		}
		set_variable = { WTT_communist_china_integration_cost = 200 }
	}
	else_if = {
		limit = { has_idea = PRC_soviet_tribute_1 }
		swap_ideas = {
			remove_idea = PRC_soviet_tribute_1
			add_idea = PRC_soviet_tribute_2
		}		
		set_variable = { WTT_communist_china_integration_cost = 250 }
	}
	else_if = {
		limit = { NOT = { has_idea = PRC_soviet_tribute_1 } }
		add_ideas = PRC_soviet_tribute_1
		set_variable = { WTT_communist_china_integration_cost = 300 }
	}

	set_country_flag = { flag = PRC_soviet_tribute_commitment_flag value = 1 days = 90 }
}

#Important to put LOWEST first
PRC_soviet_tribute_level_down = { #Not needed atm, but who knows...
	if = {
		limit = { has_idea = PRC_soviet_tribute_1 }
		#Makes the tooltip clearer if player looks at the effect early in the game
		effect_tooltip = {
			swap_ideas = {
				remove_idea = PRC_soviet_tribute_2
				add_idea = PRC_soviet_tribute_1
			}
		}
		hidden_effect = { remove_ideas = PRC_soviet_tribute_1 }
	}
	if = {
		limit = { has_idea = PRC_soviet_tribute_2 }
		swap_ideas = {
			remove_idea = PRC_soviet_tribute_2
			add_idea = PRC_soviet_tribute_1
		}
		set_variable = { WTT_communist_china_integration_cost = 300 }
	}
	if = {
		limit = { has_idea = PRC_soviet_tribute_3 }
		swap_ideas = {
			remove_idea = PRC_soviet_tribute_3
			add_idea = PRC_soviet_tribute_2
		}
		set_variable = { WTT_communist_china_integration_cost = 250 }
	}
	if = {
		limit = { has_idea = PRC_soviet_tribute_4 }
		swap_ideas = {
			remove_idea = PRC_soviet_tribute_4
			add_idea = PRC_soviet_tribute_3
		}
		set_variable = { WTT_communist_china_integration_cost = 200 }
	}
	if = {
		limit = { has_idea = PRC_soviet_tribute_5 }
		swap_ideas = {
			remove_idea = PRC_soviet_tribute_5
			add_idea = PRC_soviet_tribute_4
		}
		set_variable = { WTT_communist_china_integration_cost = 150 }
	}
	if = {
		limit = { has_idea = PRC_soviet_tribute_6 }
		swap_ideas = {
			remove_idea = PRC_soviet_tribute_6
			add_idea = PRC_soviet_tribute_5
		}
		set_variable = { WTT_communist_china_integration_cost = 100 }
	}
}

warlord_rule_all_parties = {
	hidden_effect = {
		if = {
			limit = {
				tag = SHX
			}
			add_country_leader_role = {
				character = SHX_yan_xishan
				country_leader = {
					expire = "1965.1.1"
					ideology = anti_revisionism
					traits = {
						#
					}
				}
				promote_leader = yes				
			}			
			add_country_leader_role = {
				character = SHX_yan_xishan
				country_leader = {
					expire = "1965.1.1"
					ideology = socialism
					traits = {
						#
					}
				}
				promote_leader = yes				
				
			}	
			add_country_leader_role = {
				character = SHX_yan_xishan
				country_leader = {
					expire = "1965.1.1"
					ideology = rexism
					traits = {
						#
					}
				}
				promote_leader = yes				
			}
		}
		if = {
			limit = {
				tag = GXC
			}
			add_country_leader_role = {
			character = GXC_li_zongren
				country_leader = {
					expire = "1965.1.1"
					ideology = anti_revisionism
					traits = {
						#
					}
				}
				promote_leader = yes				
			}
			add_country_leader_role = {
				character = GXC_li_zongren
				country_leader = {
					expire = "1965.1.1"
					ideology = socialism
					traits = {
						#
					}
				}
				promote_leader = yes				
			}		
			add_country_leader_role = {
				character = GXC_li_zongren
				country_leader = {
					expire = "1965.1.1"
					ideology = rexism
					traits = {
						#
					}
				}
				promote_leader = yes				
			}			
		}
		if = {
			limit = {
				tag = YUN
			}
			add_country_leader_role = {
			character = YUN_long_yun
				country_leader = {
					expire = "1965.1.1"
					ideology = anti_revisionism
					traits = {
						#
					}
				}
				promote_leader = yes				
			}
			add_country_leader_role = {
				character = YUN_long_yun
				country_leader = {
					expire = "1965.1.1"
					ideology = socialism
					traits = {
						#
					}
				}
				promote_leader = yes
			}
			add_country_leader_role = {
				character = YUN_long_yun
				country_leader = {
					expire = "1965.1.1"
					ideology = rexism
					traits = {
						#
					}
				}
				promote_leader = yes
			}			
		}
		if = {
			limit = {
				tag = XSM
			}
			add_country_leader_role = {
				character = XSM_ma_bufang
				country_leader = {
					expire = "1965.1.1"
					ideology = anti_revisionism
					traits = {
						#
					}
				}
				promote_leader = yes				
			}
			add_country_leader_role = {
				character = XSM_ma_bufang
				country_leader = {
					expire = "1965.1.1"
					ideology = socialism
					traits = {
						#
					}
				}
				promote_leader = yes	
			}
			add_country_leader_role = {
				character = XSM_ma_bufang
				country_leader = {
					expire = "1965.1.1"
					ideology = rexism
					traits = {
						#
					}
				}
				promote_leader = yes				
			}
		}
		if = {
			limit = {
				tag = SIK
			}
			add_country_leader_role = {
				character = SIK_sheng_shicai
				country_leader = {
					expire = "1965.1.1"
					ideology = despotism
					traits = {
						#
					}
				}
				promote_leader = yes
			}
			add_country_leader_role = {
				character = SIK_sheng_shicai
				country_leader = {
					expire = "1965.1.1"
					ideology = socialism
					traits = {
						#
					}
				}
				promote_leader = yes
			}
			add_country_leader_role = {
				character = SIK_sheng_shicai
				country_leader = {
					expire = "1965.1.1"
					ideology = rexism
					traits = {
						#
					}
				}
				promote_leader = yes
			}			
		}
	}
}